<?php

echo 'hao';
echo '<br>';
echo 'hao';
 

//$arr = array("123");
$arr = array(1,"wubuze",24,1);
$arr2 = array(2,"xiaoli",25,0);
$arr3 = array(3,"xiaowang",34,0);


$arr4 = array($arr,$arr2,$arr3);

//print_r($arr2);

echo '<table border="1"  >';
	
	


foreach ($arr4 as $key => $value) {
	//echo "$value[0] $value[1] $value[2] ";
	echo '<tr>';
	echo 	"<td>$value[0]</td>";
	echo 	"<td>$value[1]</td>";
	echo 	"<td>$value[2]</td>";
	echo 	"<td>$value[3]</td>";

	echo '</tr>';
	//print_r($value);
}

echo "</table>";

//对象和类 php7  php5.2  php 5.6 


foreach ($variable as $key => $value) {
	# code...
}

for ($i=0; $i <  10 ; $i++) { 
	# code...
}


//切面



//类
class Cat{

	public $name='';
	public $color='';
	public $old = 0;



	public function set_name($name){
		$this->name = $name;
	}

}



//对象
$cat1 = new Cat();


$cat1->set_name('wubuze');


//echo $cat1->name;



?>


<table border="1"  >
	<tr>
		<td>1</td>
		<td>name</td>
		<td>sex</td>
		<td>old</td> 

	</tr>
	<tr>
		<td>2</td>
		<td>小米</td>
		<td>sex</td>
		<td>old</td> 

	</tr>
	<tr>
		<td>1</td>
		<td>name</td>
		<td>sex</td>
		<td>old</td> 

	</tr>
	<tr>
		<td>1</td>
		<td>name</td>
		<td>sex</td>
		<td>old</td> 

	</tr>
</table>